import logging


my_format = '%(asctime)s-%(filename)s-%(module)s-%(lineno)d'
logging.basicConfig(
    filename='my.log',
    level= logging.INFO,
    format= my_format
)

logging.critical('critical')
logging.warning('warning')
logging.info('info')
logging.debug('debug')
logging.error('error')